<template>
  <a-card :bordered="false">
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24" type="flex" align="middle">
          <a-col flex="450px">
            <a-form-item label="">
              <a-input-group compact>
              <a-select v-model="queryParam.searchField" @change="changeForceUpdate" :dropdownMatchSelectWidth="false">
                 <a-select-option value="projectNo"> 项目编号 </a-select-option>             
                <a-select-option value="projectName"> 项目名称 </a-select-option>
                <a-select-option value="status"> 项目状态 </a-select-option>
                <a-select-option value="factoryName"> 费用支出公司 </a-select-option>
              </a-select>
              <a-input-search
                style="width: 70%"
                v-model="queryParam.keyword"
                @search="searchQuery"
                placeholder="请按照关键字进行搜索"
              />
              </a-input-group>
            </a-form-item>
          </a-col>
          <a-col flex="auto">
            <span class="flex-btn-line">
              <a-button type="primary" @click="showSearchForm=true" icon="search">高级查询</a-button>
              <a-button type="primary" @click="handlePostExportXls('项目协助模块维度报表')" icon="download">导出</a-button>
              <a-button type="primary" @click="searchReset" icon="reload">重置</a-button>
            </span>
          </a-col>

        </a-row>
      </a-form>

      <a-modal
      :visible="showSearchForm"
      width="70vw"
      :bodyStyle="{ padding: '10px' }"
      title="高级查询"
      @ok="handleToSearch"
      @cancel="showSearchForm=false"
    >
     <a-form-model ref="ruleForm" :label-col="labelCol" :wrapper-col="wrapperCol">
        <a-row :gutter="24">
          <a-col :span="8">
            <a-form-model-item label="项目状态">
              <a-input v-model="queryParam.status" />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="项目编号">
              <a-input v-model="queryParam.projectNo" />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="项目名称">
              <a-input v-model="queryParam.projectName" />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="费用支出公司">
              <a-input v-model="queryParam.factoryName" />
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-form-model>
    </a-modal>
    
    </div>
    <!-- 查询区域-END -->

    <!-- 操作按钮区域 -->
    <div class="table-operator">
    </div>
    <div class="container" >
      <a-table
        ref="table"
        bordered
        size="middle"
        :rowKey="rowKey"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,onSelectAll:onSelectAll,columnWidth:1}"
        :scroll="{x:true}"
       @change="handleTableChange">
      </a-table>

    </div>

    <!-- table区域-begin -->
    
  </a-card>
</template>


<script>
import { JeecgListMixin } from '@/mixins/JeecgListSearchMixin'
export default {
  name: 'ProjectDimensionHelp',
  mixins: [JeecgListMixin],
  data() {
    return {
      /* 勾选导出参数 */
      rowKey:'strId',
      busType:'ProjectDimensionHelp',
      description: '项目协助模块维度报表',
      columns: [
        {
          title: '序号',
          dataIndex: '',
          key: 'rowIndex',
          width: 40,
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          },
        },
        // 到期节点数	按时完成数	逾期数	未到期	总计	及时率	节点进度占比	项目状态
        {
          title: '项目状态',
          align: 'center',
          width: 100,
          dataIndex: 'status',
        },
        {
          title: '项目编号',
          align: 'center',
          width: 100,
          dataIndex: 'projectNo',
        },
        {
          title: '项目名称',
          align: 'center',
          width: 80,
          dataIndex: 'projectName',
        },
        {
          title: '费用支出公司',
          align: 'center',
          width: 80,
          dataIndex: 'factoryName',
        },
        {
          title: '当前项目实施阶段',
          align: 'center',
          width: 80,
          dataIndex: 'timeNode',
        },
        {
          title: '当前项目实施阶段状态',
          align: 'center',
          width: 80,
          dataIndex: 'reportStatus',
        },
        {
          title: 'X绩点',
          align: 'center',
          width: 80,
          dataIndex: 'projectGradePoint',
        },
        {
          title: 'Y绩点',
          align: 'center',
          width: 80,
          dataIndex: 'projectGradePointBasic',
        },
        {
          title: '核心力值',
          align: 'center',
          width: 80,
          dataIndex: 'projectGradePointCore',
        },

        // {
        //   title: '奖励金额',
        //   align: 'center',
        //   width: 80,
        //   dataIndex: 'projectExpectReward',
        // },
        // {
        //   title: '核心力奖励金额',
        //   align: 'center',
        //   width: 80,
        //   dataIndex: 'projectExpectRewardCore',
        // },
        {
          title: '协作模块',
          align: 'center',
          width: 80,
          dataIndex: 'teamName',
        },
         {
          title: '具体部门',
          align: 'center',
          width: 80,
          dataIndex: 'deptName',
        },
        {
          title: '部门主管',
          align: 'center',
          width: 80,
          dataIndex: 'leader',
        },
         {
          title: '分配X绩点',
          align: 'center',
          width: 80,
          dataIndex: 'memberGradePoint',
        },
         {
          title: '分配Y绩点',
          align: 'center',
          width: 80,
          dataIndex: 'deptGradePoint',
        },
         {
          title: '分配核心力值',
          align: 'center',
          width: 80,
          dataIndex: 'coreGradePoint',
        },
      ],
      url: {
        list: '/projectListReport/projectDimensionHelp',
        exportXlsUrl: '/projectListReport/projectDimensionHelpExport'
      },
      showSearchForm: false,
      keyword:'',
      labelCol: { span: 8 },
      wrapperCol: { span: 15 },
    }
  },
  mounted() {
    this.queryParam.searchField='projectNo'
  },
  computed: {},
  methods: {
    handleToSearch(){
      this.showSearchForm=false;
      this.searchQuery();
    },
    searchReset(){
      this.queryParam={};
      this.queryParam.searchField='projectNo';
      this.handleToSearch();
    }
  },
}

</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/hte-main.less';
@media (max-width: 1170px) {
  .page-main .container section .list-content > div.flex-num1-box {
    flex-wrap: wrap;
    > div {
      &:nth-child(1),
      &:nth-child(2) {
        width: 48%;
      }
      &:nth-child(3) {
        width: 100%;
        justify-content: flex-start;
        > span {
          margin-right: 20px;
          margin-left: 0;
        }
      }
    }
  }
  .page-main .container section .list-content > div.flex-num2-box {
    display: block;
    margin-top: 0;
  }
}
</style>